extends Node


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	#制作了地形生成的简易代码
	#生成的地形会出现在主场景中名为Node3D的节点下
	Main.map_root_node = $Node3D
	for x in 3:
		for y in 3:
			Data.chunks[Vector2i(x+1,y+1)].build_mesh()
	#生成的地形最终会被保存在一个新的场景下
	#该场景名为generate.tscn
	var ps :PackedScene = PackedScene.new()
	ps.pack($Node3D)
	ResourceSaver.save(ps,"res://generate.tscn")

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass
